﻿Ext.define('yzmh.view.author.Edit', {
    extend: 'Ext.window.Window',
    alias: 'widget.authoredit',
    title : '编辑作者',
    layout: 'fit',
    autoShow: true,
    width: 820,

    initComponent: function() {
        this.items = [
            {
                xtype: 'form',
                border: false,
                frame:true,
                bodyPadding: '5 5 0',
                fieldDefaults: {
                    labelAlign: 'right',
                    labelWidth: 60,
                    anchor: '100%'
                },
                items: [{
                    xtype: 'hidden',
                    name : 'id'
                },
                    {
                        xtype: 'textfield',
                        name : 'zzmc',
                        fieldLabel: '作者名称'
                    }, {
                        xtype: 'textfield',
                        name: 'zzbm',
                        fieldLabel: '别名'
                    }, {
                        xtype: 'textfield',
                        name: 'zm',
                        fieldLabel: '字母'
                    },{
                        xtype: 'combo',
                        name: 'dqid',
                        store: 'Diqus',
                        displayField: "diqu",
                        valueField: "id",
                        fieldLabel: '地区',
                        queryMode: "local",
                        forceSelection: true,
                        editable: false
                    }, {
                        xtype: 'textfield',
                        name: 'zztp',
                        fieldLabel: '作者图片',
                        value:'none.jpg'
                    }, {
                        xtype: 'checkbox',
                        name: 'tj',
                        fieldLabel: '是否推荐'
                    }, {
                        xtype: 'ckeditor',
                        name: 'zzjs',
                        fieldLabel: '漫画介绍',
                        height: 300,
                        CKConfig: {
                            baseFloatZIndex: 20000,
                            resize_enabled: false
                        }
                    }
                ]
            }
        ];

        this.buttons = [
            {
                text: '保存',
                action: 'save'
            },
            {
                text: '取消',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    }
});
